home *** CD-ROM | disk | FTP | other *** search
- Path: news.ov.com!news
- From: glenn@ov.com (Fletcher.Glenn@ov.com)
- Newsgroups: comp.lang.c
- Subject: Re: making an <include.h> file
- Date: 3 Apr 1996 17:06:57 GMT
- Organization: OpenVision
- Message-ID: <4jub7h$pal@spanky.pls.ov.com>
- References: <4js1iu$p1i@newsbf02.news.aol.com>
- Reply-To: glenn@ov.com
- NNTP-Posting-Host: foghorn.pls.ov.com
-
- In article p1i@newsbf02.news.aol.com, mjalford@aol.com (MJAlford) writes:
- >How does one setup a UNIX System / Makefile so that a "*.h" file is
- >considered
- >a system include file? I don't want to put it in /usr/include. I'm
- >assuming I do
- >the same thing so that my "library.so" is considered a system library.
- >
- >Thanks,
- >Michael Alford
- >Software Engineer
- >Accuvoice, Inc.
- >MJAlford@aol.com
-
-
- I'll bet that what you really want is a common place to keep your headers
- and library files. When the cpp program is trying to resolve #include <header.h>
- it looks in /usr/include, and it also looks in any directory that is
- listed with a -I option on the compile line. For example:
- cc -I/my_include_dir -o myprog myprog.c
-
- Similarly you can link in libraries in places other than /usr/lib using
- the -L option. For example:
- cc -o myprog myprog.c -L/my_lib_dir -lmylib
-
- On Sun platforms you might also want to use the -R (for runtime linking) of
- dynamic libraries. See the cc, cpp, and ld man pages.
-
- Fletcher.Glenn@ov.com
-
-
-